<?php
/**
 * 系统主控制器类
 *
 * @author Fakis Chan <fakis738@gmail.com>
 * @link http://wiki.woosize.com/manual/class/woosize.php
 * @version $id woosize.php$
 * @since 0.1
 */

defined('WS_BEGIN_TIME') or define('WS_BEGIN_TIME', microtime(TRUE));
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('WS_PATH') or define('WS_PATH', dirname(__FILE__));

class WooSize
{
    const VERSION = '0.1.738';
    private static $_site;

    public static function import()
    {
    }

    public static function site()
    {
        return self::$_site;
    }

    public static function createSiteClient($config=NULL)
    {
        return self::createSite('client', $config);
    }

    public static function createSiteServer($config=NULL)
    {
        return self::createSite('server', $config);
    }

    private static function createSite($side, $config)
    {
        return new WsSite($side, $config);
    }

    public static function autoload($className)
    {
        $className = $className. '.php';
    }
}

class Ws extends WooSize{}
spl_autoload_register(array('WooSize', 'autoload'));
require(WS_PATH. DS. 'interface.php');
